package com.viphome.security;

import org.springframework.stereotype.Component;

/**
 * Created by wangzhanjin on 2017/12/22.
 */
@Component
public class AuthService {

    public void checkAccess(){
        String user = CurrentUserHolder.get();
        if(!"admin".equals(user)){
            System.out.println("不是admin用户。。。。。。。。。。。。");
            throw new RuntimeException("操作不被允许！！！");
        }
    }
}
